from flask import Flask
from models import db
from routes import main_bp
from datetime import timedelta
import config

app = Flask(__name__, static_folder='static')
app.config.from_object(config.Config)
app.config['PERMANENT_SESSION_LIFETIME'] = timedelta(minutes=30) 
app.config['SESSION_COOKIE_SECURE'] = True

app.register_blueprint(main_bp)
db.init_app(app)

if __name__ == '__main__':
    app.run(debug=True)